﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Object One/Admin.Master" AutoEventWireup="true" CodeBehind="City.aspx.cs" Inherits="ProjectHK3.Object_One.City" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div style="text-align: center">

        <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="45pt" ForeColor="#FF6600" Text="๖ۣۜCities ๖ۣۜManagement"></asp:Label>
        <br />
        <br />
        <table style="width:65%;">
            <tr>
                <td style="height: 41px; text-align: left; width: 138px;">
                    <asp:Label ID="Label3" runat="server" style="text-align: right" Text="City Name:"></asp:Label>
                </td>
                <td style="height: 41px; text-align: left; width: 240px;">
                 &nbsp;<asp:TextBox ID="TextBox1" type="text" runat="server" CssClass="textbox"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1" ErrorMessage="Not Blank!" ForeColor="Red" SetFocusOnError="True"></asp:RequiredFieldValidator>
                </td>
                <td style="height: 41px; text-align: left; width: 97px;">
                    <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Object One/images/1389547665_search.png" OnClick="ImageButton1_Click" />
                </td>
            </tr>
            <tr>
                <td style="text-align: left; " colspan="2">
                    <asp:HyperLink ID="HyperLink1" runat="server" ForeColor="#FF6600" NavigateUrl="~/Object One/CreateCity.aspx" Font-Bold="True" Font-Overline="False" Font-Size="X-Large">Create New City</asp:HyperLink>
                </td>
                <td style="width: 97px; text-align: left">
                    <asp:Label ID="Label4" runat="server" Text="Total:" ForeColor="Blue"></asp:Label>
                    <asp:Label ID="Label5" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" HorizontalAlign="Center" PageSize="15" OnRowDeleting="GridView1_RowDeleting" CellPadding="4" ForeColor="#333333" GridLines="None">
                        <AlternatingRowStyle BackColor="White" />
                        <Columns>
                            <asp:BoundField DataField="CITY_CODE" HeaderText="CITY CODE" />
                            <asp:BoundField DataField="CITY_NAME" HeaderText="CITY NAME" />
                            <asp:TemplateField HeaderText="ACTION">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:LinkButton ID="_lbtDelete" runat="server" CommandArgument='<%# Eval("CITY_ID") %>' CommandName="delete" OnClientClick="return confirm('Are you sure you want to delete this record ?')" OnCommand="_lbtDelete_Command" ToolTip="Delete City" CausesValidation="False">Remove</asp:LinkButton>
                                    &nbsp; &nbsp;<asp:LinkButton ID="_lbtViewDetails" runat="server" CommandArgument='<%# Eval("CITY_ID") %>' CommandName="detail" OnCommand="_lbtViewDetails_Command" ToolTip="View Details City information" CausesValidation="False"> View Details</asp:LinkButton>
                                    &nbsp;&nbsp;
                                    <asp:LinkButton ID="_lbtViewBranch" runat="server" CommandArgument='<%# Eval("CITY_ID") %>' OnCommand="_lbtViewBranch_Command" Text="View Branches" ToolTip="View all branch belong to city" CausesValidation="False"></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <EditRowStyle BackColor="#2461BF" />
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <RowStyle BackColor="#EFF3FB" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <SortedAscendingCellStyle BackColor="#F5F7FB" />
                        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                        <SortedDescendingCellStyle BackColor="#E9EBEF" />
                        <SortedDescendingHeaderStyle BackColor="#4870BE" />
                    </asp:GridView>
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    <asp:GridView ID="_grwBranch" runat="server" AutoGenerateColumns="False" OnPageIndexChanging="_grwBranch_PageIndexChanging" PageSize="15" CellPadding="4" ForeColor="#333333" GridLines="None">
                        <AlternatingRowStyle BackColor="White" />
                        <Columns>
                            <asp:BoundField DataField="BRANCH_CODE" HeaderText="BRANCH CODE" />
                            <asp:BoundField DataField="BRANCH_NAME" HeaderText="BRANCH NAME" />
                            <asp:BoundField DataField="BRANCH_PHONE" HeaderText="PHONE" />
                            <asp:BoundField DataField="ADDRESS" HeaderText="ADDRESS" />
                        </Columns>
                        <EditRowStyle BackColor="#2461BF" />
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <RowStyle BackColor="#EFF3FB" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <SortedAscendingCellStyle BackColor="#F5F7FB" />
                        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                        <SortedDescendingCellStyle BackColor="#E9EBEF" />
                        <SortedDescendingHeaderStyle BackColor="#4870BE" />
                    </asp:GridView>
                </td>
            </tr>
        </table>

    </div>
</asp:Content>
